/**
 * @author: mattwang@tencent.com
 * @date: 2012-10-16
 */

#ifndef __MAX_ENT_CORE__
#define __MAX_ENT_CORE__

#include <iostream>
#include <map>
#include <string>
#include <vector>

#include "class_loader.h"
#include "lbfgs_trainer.h"

using namespace std;

class MaxEntCore {
public:
	int train(ClassLoader &data);
	void save_model();
	void load_model();
	int predict(ClassLoader &data, string predict_result);
	void eval_all();

private:
	int prepare_data(ClassLoader &data, LBFGSTrainer& trainer, double sigma2);
	int destroy_data(LBFGSTrainer& trainer);

};

#endif  // __LDA_CORE__
